package com.mak.menoy.widget;


import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.view.View;
import android.view.ViewGroup.LayoutParams;

import com.mak.menoy.R;

public class CustomDialog extends Dialog {
	private OnCancelListener mListener;
	
	public CustomDialog(Context context) {
		super(context, R.style.CustomDialog);
	}
	
	public CustomDialog(Context context, DialogInterface.OnCancelListener listener) {
		this(context);
		mListener = listener;
	}
	
	public CustomDialog(Context context, View contentView) {
		this(context);
		addContentView(contentView, new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
	}

	@Override
	public void cancel() {
		super.cancel();
//		if (mListener != null)
//			mListener.onCancel(this);
	}

	public void setmListener(OnCancelListener mListener) {
		this.mListener = mListener;
	}
	
	
}
